/*
 *  torsionfreebeam.h
 *  EPPI-0.0
 *
 *  Created by Juan Carlos Garcia Orden on 01/08/2012
 *
 */
 
#ifndef _torsionfreebeam_h_
#define _torsionfreebeam_h_

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
#include "mecsystem.h"
#include "BODIES/body.h"
#include "point.h"
#include "CONSTRAINTS/consdis.h"
#include "CONSTRAINTS/align3p.h"

class MecSystem;

using namespace std;

class TorsionFreeBeam : public Joint
{
public:
	string matName;
	double area;
	double isec;
	double L;
	double nelem;
	double nsegments;
/*	Data members from the base class Joint
	string name;
	int dim;	
	MecSystem* parentSystem;				
	vector<Component*> vComponents;
	vector<Component*> vLoads;
 	string outGraphFilex;
	vector<string> vPointNamesSurface;
	vector<Point*> vPPointSurface;
	ofstream localFGraph;
*/
public:
	TorsionFreeBeam(){}
	TorsionFreeBeam(ifstream &, string, MecSystem*, vector<string> &, vector<vector<string> > &, string, double, double, double);
	~TorsionFreeBeam(){}
	
	/** Virtual functions from base */
	void setPTPointsCons();		/** Set pointers to points in each constraint */
	void setPPointSurface();	/** Set pointers to surface points in each component */
//	void writeFileGraph(ofstream&, string&);	/** Write graphical output to file */
	void writeMSH(ofstream&);		/** MSH format for Gmsh */
	void writeVTU(ofstream&);		/** VTU format for Paraview */
	void writeOOGL(ofstream&);	/** OOGL format for Geomview */
	void setParamAtCons();
	
	/** Local functions */

	/** Friend functions */
	friend void printSTLVector(const vector<string>& v);
};

#endif
